<template>
  <detail-page v-loading="loading">
    <template #top>
      <info-header id="basic" title="注销信息"></info-header>
      <pub-detail-description
        :data="pageData"
        :columns="basic"
      ></pub-detail-description>
    </template>
  </detail-page>
</template>
  
  <script setup>
import { formatValue } from '@/utils/index'
import { get_zzda_detail } from '@/api/basicSetting.js'
const loading = ref(false)
const route = useRoute()
import { ElMessage, ElMessageBox } from 'element-plus'
// const router = useRouter()
const props = defineProps({
  zxxx: {
    type: String,
    default: {}
  }
})
const pageData = ref({})

const basic = ref([])
onMounted(() => {
  if (props.zxxx) {
    pageData.value = props.zxxx
    if (pageData.value.cancellationReasonCode == '1') {
      basic.value = [
        { prop: 'cancellationPerson', label: '注销操作人', span: 2 },
        { prop: 'cancellationTime', label: '注销时间', span: 2 },
        {
          prop: 'cancellationReasonCode',
          label: '注销原因',
          span: 2,
          type: 'dict',
          dictCode: 'ZZDA-ZXYY'
        },
        { prop: 'deathTime', label: '实际死亡日期', span: 2 }
      ]
    } else {
      basic.value = [
        { prop: 'cancellationPerson', label: '注销操作人', span: 2 },
        { prop: 'cancellationTime', label: '注销时间', span: 2 },
        {
          prop: 'cancellationReasonCode',
          label: '注销原因',
          span: 2,
          type: 'dict',
          dictCode: 'ZZDA-ZXYY'
        },
        { prop: 'cancellationExplain', label: '注销原因说明', span: 2 }
      ]
    }
  }
})
</script>
  
  <style scoped lang="scss">
.form-table {
  &-header {
    display: flex;
    background-color: #f4f9ff;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ebeef5;

    .header-item {
      flex: 1;
      padding: 0 5px;
      height: 100%;
      // line-height: 46px;
      // text-align: center;
      border-left: 1px solid #ebeef5;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  &-item {
    display: flex;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ebeef5;

    .item {
      flex: 1;
      width: 100px;
      padding: 0 5px;
      height: 100%;
      line-height: 46px;
      text-align: center;
      border-left: 1px solid #ebeef5;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}

.empty {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #333;
  font-size: 14px;
  padding: 30px 0;
  border: 1px solid rgb(235, 238, 245);

  span {
    margin-top: 10px;
  }
}
</style>
  